package com.weirn.algorithm.linkedlist;

import java.util.Iterator;
import java.util.LinkedList;

/**
 * Created by yp-tc-2563 on 2018/2/1.
 */
public class Test {

    public static void main(String args[]){
        LinkedList<String> list = new LinkedList<> (  );
        list.add ( "wei" );
        list.add ( "ru" );
        list.add ( "ning" );
        Iterator<String> iterator = list.iterator ();
        while(iterator.hasNext ()){
            System.out.println (iterator.next ());
        }
    }
}
